<script>
    $(function(){
        $("button.print").click(function(){
            window.open("<?php echo base_url("../print/".@$filename); ?>","print");
        });

    
		$(".search input").keypress(function(e){
            if (e.keyCode == 13){
                $(".search button").click();
            }
        });
        
		$(".search button").click(function(){
            inputsearch = $(".search input").val();
            $.ajax({
                url : "c_laporan",
                data : {task : '<?php echo str_replace(".html","",@$filename)?>', type : 'type', search : inputsearch },
                type : 'post'
            }).done(function(response){
                $(".html").html(response);
            });
          /*  grid_proyek.unugrid("setData",{ search : inputsearch});
            grid_proyek.unugrid("refresh");
            */
        });
    });
</script>
<?php echo $optional; ?>

<p>&nbsp;</p>
      <div class="input-group search" style="max-width:500px">
         <input type="text" class="form-control" placeholder="Filter">
         <span class="input-group-btn">
         <button type="button" class="btn yellow">Search !</button>
         </span>
      </div>
<p>&nbsp;</p>

<div style="overflow:auto;" class="html">
    <?php echo $html; ?>
</div>
<p />
<button class="btn btn-primary print" ><i class="icon-print"></i> Print</button>
<iframe name="print" style="display:none;"></iframe>